package com.common.app.viewmodel

import androidx.lifecycle.LiveData
import com.common.app.data.bean.VersionResBean
import com.common.app.data.repository.CommonPurposeApi
import com.common.base.app.viewmodel.BaseViewModel
import com.common.base.app.viewmodel.Cancel
import com.common.base.data.CommonBean

abstract class CommonViewModel : BaseViewModel() {

    //检测版本更新
    fun requestVersion(error: Cancel): LiveData<CommonBean<VersionResBean>> = emit(error) {
        CommonPurposeApi.requestVersion()
    }

}